package cn.gson.crm.controller.student;

import cn.gson.crm.controller.BaseServlet;
import cn.gson.crm.model.dao.RecordsDao;
import cn.gson.crm.vo.RecordsVo;

import java.io.IOException;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * 交易记录
 */
@WebServlet("/student/records")
public class StudentRecords extends BaseServlet {
	private static final long serialVersionUID = 1L;
	private RecordsDao recordDao = new RecordsDao();
	
	protected void get(HttpServletRequest request, HttpServletResponse response) throws Exception {
		String sid = request.getParameter("sid");	
		List<RecordsVo> recordList = recordDao.getRecordsAllList(Integer.parseInt(sid));
		//System.out.println("recordList是"+recordList.get(0).getOrderCustName());
		request.setAttribute("recordList", recordList);
		forward("student/stu_records.jsp");
	}
}
